package com.xiyi.shouxin.view.pojo;

import com.xiyi.shouxin.entity.user.User;

import lombok.Getter;

@Getter
public class UserView extends User {
    private AdminView admin;
    private PracticeView practice;

    public UserView(User user, AdminView admin,PracticeView practice) {
        this.admin = admin;
        this.practice=practice;
        if (user == null) {
            return;
        }
        this.setId(user.getId());
        this.setAdminId(user.getAdminId());
        this.setDeviceId(user.getDeviceId());
        this.setAccount(user.getAccount());
        this.setNickName(user.getNickName());
        this.setRealName(user.getRealName());
        this.setAvatar(user.getAvatar());
        this.setSex(user.getSex());
        this.setPhone(user.getPhone());
        this.setStudentId(user.getStudentId());
        this.setProvince(user.getProvince());
        this.setCity(user.getCity());
        this.setArea(user.getArea());
        this.setToken(user.getToken());
        this.setIsBind(user.getIsBind());
        this.setIsAnswer(user.getIsAnswer());
        this.setCreatedAt(user.getCreatedAt());
        this.setUpdatedAt(user.getUpdatedAt());
        this.setDeletedAt(user.getDeletedAt());
    }
}
